package com.tanhua.dubbo.server.api;

import cn.hutool.core.date.DateTime;
import com.tanhua.common.pojo.User;
import com.tanhua.dubbo.server.pojo.LogRecord;

import java.util.List;

/**
 * @Author lenny
 * @create 2021/9/17 22:00
 */


public interface BackgroundDashboardApi {


    /**
     *月,周,昨日,活跃用户数 统计
     *
     * @param defaultTime
     * @param appointedTime
     * @return
     */
    Integer activeUserNum(Long defaultTime, Long appointedTime);

    /**
     * 今日活跃用户
     *
     * @param defaultTime
     * @param nowTime
     * @return
     */
    Integer todayActiveUserNum(Long defaultTime, Long nowTime);

    Integer newUserAmplitude(Integer newUsersToday,Integer newUsersYesterday);

    Integer activeUserAmplitude(Integer todayUsers, Integer yesterdayUsers);


    /**
     * 统计登录 次数
     *
     * @param defaultTime
     * @param nowTime
     * @return
     */
    Integer loginCount(long defaultTime, long nowTime);

    /**
     *平均使用时长
     *
     * @param defaultTime
     * @param weekTime
     * @return
     */
    Integer averageUseTime(long defaultTime, long weekTime);

    Integer loginCountBefore(long defaultTime, long dayTime);

    Integer queryActiveUserCountByDate(long startTime, long endTime);


    List<LogRecord> queryNextDayLeft(long startTime, long endTime);
}
